﻿using System.Collections.Generic;
using SARS.Biz.Facades;
using SARS.DAO;
using SARS.DAO.Facades;
using SARS.Entity;

namespace SARS.Biz
{
    public class CourseBO : ICourseBO
    {
        private readonly ICourseDAO _dao = new CourseDAO();

        public List<CourseEntity> RetriveAllCourse()
        {
            return _dao.RetriveAllCourse();
        }

        public List<CourseEntity> RetriveCoursesByProgrammeID(int programmeId)
        {
            return _dao.RetriveCoursesByProgrammeID(programmeId);
        }

        public CourseEntity RetrieveCourseById(int courseId)
        {
            return _dao.RetrieveCourseById(courseId);
        }


        public int AssignStudentToCourses(List<StudentCourseEntity> studentCourseEntities)
        {
            return _dao.AssignStudentToCourses(studentCourseEntities);
        }


        public List<StudentCourseEntity> RetrieveStudentCourse()
        {
            return _dao.RetrieveStudentCourse();
        }


        public int DeleteCourseById(int id)
        {
            return _dao.DeleteCourseById(id);
        }

        public int UpdateCourse(CourseEntity entity)
        {
            return _dao.UpdateCourse(entity);
        }


        public List<StudentCourseEntity> RetrieveStudentCourseByCourseId(int id)
        {
            return _dao.RetrieveStudentCourseByCourseId(id);
        }


        public int DeleteCourseStudentById(int courseId, int studentId)
        {
            return _dao.DeleteCourseStudentById(courseId, studentId);
        }


        public int UpdateStudentCourseById(StudentCourseEntity entity)
        {
            return _dao.UpdateStudentCourseById(entity);
        }


        public List<CourseEntity> GetAllCourseByStudentIdAndProgramId(int programId, int studentId)
        {
            return _dao.GetAllCourseByStudentIdAndProgramId(programId, studentId);
        }


        public List<CourseEntity> GetAllCourseByTutorIdAndProgramId(int programId, int tutorId)
        {
            return _dao.GetAllCourseByTutorIdAndProgramId(programId, tutorId);
        }
    }
}